package chpt08;

import java.io.IOException;
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

public class DirListGlob {
	public static void main(String[] args) throws IOException{
		Path dir = Paths.get("/tmp");
		try(DirectoryStream<Path> files = Files.newDirectoryStream(dir,"*.{java,class}")){
			for(Path file : files)
				System.out.println(file.getFileName());
		}
	}
}
